<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
if( file_exists('stop.php') ) {
	//include_once('stop.php');
}

//
require(dirname(dirname(__FILE__)) . '/includes/application_top.php');

//
set_time_limit(0);

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/news/news.class.php');
$mObj = new NewsBase();

//
for($i=0; $i<100000; $i++) {
	$name = 'News Name ' . $i;
	$link = $mObj->_filter_link($name);
	$subject = 'News Subject ' . $i;
	
	$query = "insert into pp_news (news_link, news_name, news_subject, news_status) " 
			. " values ('" . $link . "', '" . $name . "', '" . $subject . "', 1)";
	$adb->query($query);
	
	//
	if( $i > 0 && $i % 10000 == 0 ) {
		echo $i;echo '<br>';	
	}
}

//
echo 'OK';
//
?>